﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FeatureModelCore.FMAnalyzer
{
    public class FMProductItem
    {
        #region Properties
        public string ItemName { get { return _itemName; } internal set { _itemName = value; } }
        #endregion
        #region Fields
        private string _itemName;
        #endregion
        /// <summary>
        /// internal contructor
        /// </summary>
        internal FMProductItem(string itemName)
        {
            _itemName = itemName;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public override string ToString()
        {
            return _itemName;
        }
        
        #region Equals
        /// <summary>
        /// 
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public override bool Equals(object obj)
        {
            FMProductItem item = obj as FMProductItem;
            if (item == null)
            {
                return false;
            }
            return item._itemName == this._itemName;
        }
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public override int GetHashCode()
        {
            return base.GetHashCode();
        }
        #endregion
    }
}
